#ifndef LOCKWIDGET_H
#define LOCKWIDGET_H

#include <QWidget>
#include <QMouseEvent>
#include <QPainter>
#include <QPushButton>
#include <QList>

namespace Ui {
class LockWidget;
}

class LockWidget : public QWidget
{
    Q_OBJECT

public:
    explicit LockWidget(QWidget *parent = nullptr);
    ~LockWidget();
    void mousePressEvent(QMouseEvent*event) override;
    void mouseMoveEvent(QMouseEvent*event)  override;
    void mouseReleaseEvent(QMouseEvent*event)   override;
    void paintEvent(QPaintEvent *event) override;

private:
    Ui::LockWidget *ui;

    QPoint curPos;
    bool isPressed;
    QList<QPushButton*> No1;
    QList<QPushButton*> No2;
    QList<QPushButton*> No3;
    QList<QPushButton*> No4;
    QList<QPushButton*> No5;
};

#endif // LOCKWIDGET_H
